<ui:composition template="/WEB-INF/template/layoutPadrao.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

	<ui:define name="titulo">Novo Ano Inventario</ui:define>

	<f:metadata>
		<f:viewParam name="inventario" value="#{cadastroInventarioBean.inventario}" />
	</f:metadata>


	<ui:define name="corpo">
		<h:form>
		
			<h1>Novo Ano Inventario</h1>
			
			<p:messages autoUpdate="true" closable="true" />

			<p:toolbar style="margin-top:20px">
				<p:toolbarGroup>
					<p:button value="Novo" outcome="/inventarios/cadastroInventario" />
					<p:commandButton value="Salvar" id="botaoSalvar"
						action="#{cadastroInventarioBean.salvar}" update="@form" />
				</p:toolbarGroup>

				<p:toolbarGroup align="right">
					<p:button value="Pesquisa"	outcome="/inventarios/pesquisaInventario" />
				</p:toolbarGroup>
			</p:toolbar>

			<p:panelGrid columns="2" id="painel"
				style="width:100%; margin-top:20px" columnClasses="rotulo, campo">

				<p:outputLabel value="Ano" for="ano" />
				<p:inputMask id="ano" mask="9999"
					value="#{cadastroInventarioBean.inventario.inventario}" />
			</p:panelGrid>

		</h:form>
	</ui:define>
</ui:composition>